from app.lib.TencentDNS import TencentDNS
from app.lib.AliDNS import AliDNS
from app.lib.HuaWeiDNS import HuaWeiDNS
from app.functions import *

# dnsPod = TencentDNS({"secretId": "", "secretKey": ""})
# res = dnsPod.CreateRecord('lfveeker.top','demo','A','192.168.88.101')
# res = dnsPod.ModifyRecord('lfveeker.top',2113292926,'demo','A','192.168.88.102')
# res =dnsPod.DeleteRecord('lfveeker.top',2113292926)
# res = dnsPod.DescribeRecordList('lfveeker.top', {"recordType": "TXT", "subDomain": ""})

# dnsPod = AliDNS({"secretId": "", "secretKey": ""})
# res = dnsPod.CreateRecord('lfveeker.com', 'demo4', 'A', '192.168.88.102')
# res = dnsPod.ModifyRecord('lfveeker.com', 1943202624309500928,'demo4', 'A', '192.168.88.101',{"TTL":800})
# res = dnsPod.DeleteRecord('lfveeker.com', 1943202624309500928)
# res = dnsPod.DescribeRecordList('lfveeker.com')


dnsPod = HuaWeiDNS({"ak": "", "sk": ""})
res = dnsPod.ListPublicZones({"domain": "lfveeker.site"})
# res = dnsPod.CreateRecord("ff8080829765146b0197c437281722a6", "demo7.lfveeker.site", "A", "192.168.88.222")
# res = dnsPod.ModifyRecord("ff8080829765146b0197c437281722a6", "ff80808297653e27019808429dcf1f5c", "dem7.lfveeker.site",
#                           "A", "192.168.88.111")
# res =dnsPod.DeleteRecord("ff8080829765146b0197c437281722a6","ff8080829765146b0197c437281822a7")
# print(res)
# res = dnsPod.DescribeRecordList("ff8080829765146b0197c437281722a6", {"subDomain": "demo"})
print(res)
